package com.swxy.club.feignClient;

import com.swxy.club.config.FeignConfig;
import com.swxy.club.interceptor.FeignRequestInterceptor;
import com.swxy.club.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 易
 */

@FeignClient(name = "user-service",configuration = {FeignRequestInterceptor.class,  FeignConfig.class})
public interface UserServiceFeignClient {

    @GetMapping("/api/currentUser")
    Result selectCurrentUser();

    @GetMapping("/api/users")
    Result selectUsers(@RequestParam("ids")  List<Long> ids);
    @GetMapping("/api/{id}")
    Result getUser(@PathVariable("id") Long id);
}